﻿<%@ WebHandler Language="C#" Class="UserHandler" %>

using System;
using System.Web;
using Ext.Net;
using System.Collections.Generic;
using System.Collections;

public class UserHandler : IHttpHandler
{

    public void ProcessRequest(HttpContext context)
    {
        context.Response.ContentType = "text/json";

        List<UserProfile> users = MembershipExtender.GetAll();
        context.Response.Write(string.Format("{{totalCount:{1},'users':{0}}}", JSON.Serialize(users), users.Count));
    }

    public bool IsReusable
    {
        get
        {
            return true;
        }
    }

}